<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=">
    <meta
            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
            name="viewport">
    <meta name="format-detection" content="telphone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <!-- UC强制全屏 -->
    <meta name="full-screen" content="yes">
    <!-- QQ强制全屏 -->
    <meta name="x5-fullscreen" content="true">
    <!-- UC应用模式-->
    <meta name="browsermode" content="application">
    <!-- QQ应用模式 -->
    <meta name="x5-page-mode" content="app">
    <title>{$title}</title>
</head>
<link rel="stylesheet" href="__TEMPLATE__/mobile/index/css/global.css"
      type="text/css">
<script src="__TEMPLATE__/sysme/js/jquery-1.9.1.min.js"></script>
<style>
    body,#wrapper_1 {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    } /*解决苹果滚动条卡顿的问题*/
    #wrapper_1 {
        overflow-y: visible !important;
    }

    body.login-bg {
        padding-top: 97px;
    }

    .lott-menu {
        position: fixed;
        top: 44px;
        left: 0;
        margin-top: 0 !important;
    }
</style>
<style>
    .gray {
        -webkit-filter: grayscale(100%);
        -moz-filter: grayscale(100%);
        -ms-filter: grayscale(100%);
        -o-filter: grayscale(100%);
        filter: grayscale(100%);
        filter: gray;
    }
    #tsk{width:200px;height:150px;display:none;background:#fff;position:absolute;top:200px;left:50%;margin-left:-100px;border-radius: 5px;text-align: center;font-size:14px;z-index: 1111;}
    #ts{width:60px;height:30px;position:absolute;bottom:10px;left:50%;margin-left:-25px;background:#e7aea6;line-height:30px;border-radius: 4px;color:#fff;z-index: 22222;}
    #tsk p{width:100%;height:70px;position:absolute;top:0;right:0;top:0;bottom:0;margin:auto;text-align: center;color:#f00;font-weight:bold;z-index: 111111;font-size:18px;}
    .header #reveal-left-app{width:30px;height:30px;background-size:30px;}
</style>
<script>
    //覆盖（重写 ）iscro-lot.js 同名方法避免bug产生 (只有使用IScroll.js的地方才需要调用iscro-lot.js文件中的 loaded()方法 )
    function loaded() {
    }//空实现
    firstPage = 0;//常亮
    //  document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false); //uc浏览器滑动
</script>
{block name="style"}{/block}
<body>
<div class="header">
    <div class="headerTop">
        <div class="ui-toolbar-left" style="margin-top: 8px;margin-left:5px;">
            <button id="reveal-left-app" onClick="appJump()">reveal</button>
        </div>
        <h1 class="ui-toolbar-title" style="line-height:47px;" >{$title}</h1>
    </div>
</div>
{block name="body"}{/block}
</body>
<script>
    $('div.lott-menu li').click(function() {
        var cat = $(this).data('cat');
        if (cat == 1) { //高频
            $('div.lottery-list li.game_category_2').hide();
            $('div.lottery-list-erect li.game_category_2').hide();
            $('div.lottery-list li.game_category_1').show();
            $('div.lottery-list-erect li.game_category_1').show();
        } else if (cat == 2) { //低频
            $('div.lottery-list li.game_category_1').hide();
            $('div.lottery-list-erect li.game_category_1').hide();
            $('div.lottery-list li.game_category_2').show();
            $('div.lottery-list-erect li.game_category_2').show();
        } else { //全部
            $('div.lottery-list li').show();
            $('div.lottery-list-erect li').show();
        }
        for ( var i = 0; i < 3; i++) {
            if (i == cat) { //选中
                $('div.lott-menu li.nav_category_' + i).hide();
                $('div.lott-menu li.nav_sel_' + i).show();
            } else { //未选中
                $('div.lott-menu li.nav_category_' + i).show();
                $('div.lott-menu li.nav_sel_' + i).hide();
            }
        }
        loaded();
    });
    function appJump(){
        var appfrom = '{$appfrom}';
        if( 1==parseInt(appfrom) ){
            jump2app.jump2MainActivity();
        }else{
            WebViewJavascriptBridge.callHandler('backClick');
        }

    }
    function setupWebViewJavascriptBridge(callback) {
        if (window.WebViewJavascriptBridge) { return callback(WebViewJavascriptBridge); }
        if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback); }
        window.WVJBCallbacks = [callback];
        var WVJBIframe = document.createElement('iframe');
        WVJBIframe.style.display = 'none';
        WVJBIframe.src = 'https://__bridge_loaded__';
        document.documentElement.appendChild(WVJBIframe);
        setTimeout(function() { document.documentElement.removeChild(WVJBIframe) }, 0)
    }
    setupWebViewJavascriptBridge(function(bridge) {
        /* Initialize your app here */
        bridge.registerHandler('JS Echo', function(data, responseCallback) {
            console.log("JS Echo called with:", data)
            responseCallback(data)
        })
        bridge.callHandler('ObjC Echo', {'key':'value'}, function responseCallback(responseData) {
            console.log("JS received response:", responseData)
        })
    })
</script>
</html>
